<%--
*@Description 
*@Author KingTeng
*@Date 2022/3/13
*@Time 19:00
--%>
<%--
*@Description
*@Author KingTeng
*@Date 2022/3/13
*@Time 14:16
--%>
<html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>

<%@include file="header.jsp"%>
<%@include file="top.jsp"%>


<script>
    $(function(){

        <c:if test="${!empty msg}">
        $("span.errorMessage").html("${msg}");
        $("div.registerErrorMessageDiv").css("visibility","visible");
        </c:if>

        $(".registerForm").submit(function(){
            if(0==$("#account").val().length){
                $("span.errorMessage").html("请输入账号");
                $("div.registerErrorMessageDiv").css("visibility","visible");
                return false;
            }
            if(0==$("#password").val().length){
                $("span.errorMessage").html("请输入密码");
                $("div.registerErrorMessageDiv").css("visibility","visible");
                return false;
            }
            if(0==$("#city").val().length){
                $("span.errorMessage").html("请输入地区");
                $("div.registerErrorMessageDiv").css("visibility","visible");
                return false;
            }
            if(0==$("#address").val().length){
                $("span.errorMessage").html("请输入机构名");
                $("div.registerErrorMessageDiv").css("visibility","visible");
                return false;
            }
            if(0==$("#nam").val().length){
                $("span.errorMessage").html("请输入具体地址");
                $("div.registerErrorMessageDiv").css("visibility","visible");
                return false;
            }
            if(0==$("#phone").val().length){
                $("span.errorMessage").html("请输入电话");
                $("div.registerErrorMessageDiv").css("visibility","visible");
                return false;
            }
            return true;
        });
    })
</script>

<br>

<form method="post" action="forAddStand" class="registerForm">
    <div class="registerDiv">
        <div class="registerErrorMessageDiv">
            <div class="alert alert-danger" role="alert">
                <span class="errorMessage"></span>
            </div>
        </div>

        <table class="registerTable" align="center">
            <tr>
                <td  class="registerTip registerTableLeftTD">设置账号</td>
                <td></td>
            </tr>
            <tr>
                <td class="registerTableLeftTD">账号</td>
                <td  class="registerTableRightTD"><input id="account" name="account" placeholder="此处非姓名" > </td>
            </tr>

            <tr>
                <td class="registerTableLeftTD">登陆密码</td>
                <td class="registerTableRightTD"><input id="password" name="pwd"  placeholder="设置你的登陆密码" > </td>
            </tr>
            <tr>
                <td class="registerTableLeftTD">地区</td>
                <td class="registerTableRightTD"><input id="city" name="city"  placeholder="如：江岸区"  > </td>
            </tr>
            <tr>
                <td class="registerTableLeftTD">机构名</td>
                <td class="registerTableRightTD"><input id="address" name="address" > </td>
            </tr>
            <tr>
                <td class="registerTableLeftTD">具体地址</td>
                <td class="registerTableRightTD"><input id="nam" name="nam" > </td>
            </tr>
            <tr>
                <td class="registerTableLeftTD">联系电话</td>
                <td class="registerTableRightTD"><input id="phone" name="phone"> </td>
            </tr>
            <tr>
                <td colspan="2" class="registerButtonTD">
                    <!-- 位于表单中的<button>，如果没有显示的type，默认为submit -->
                    <a><button type="submit">提   交</button></a>
                </td>
            </tr>
        </table>
    </div>
</form>


